package cn.iocoder.yudao.module.ride.dal.mysql.memberlevel;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ride.dal.dataobject.memberlevel.MemberLevelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ride.controller.admin.memberlevel.vo.*;

/**
 * 会员等级管理 Mapper
 *
 * @author tong
 */
@Mapper
public interface MemberLevelMapper extends BaseMapperX<MemberLevelDO> {

    default PageResult<MemberLevelDO> selectPage(MemberLevelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MemberLevelDO>()
                .likeIfPresent(MemberLevelDO::getLevelName, reqVO.getLevelName())
                .eqIfPresent(MemberLevelDO::getLevelCode, reqVO.getLevelCode())
                .orderByDesc(MemberLevelDO::getId));
    }

}